﻿using System.ComponentModel.Composition;

namespace Demos.Puzzles.WolfGoatCabbage
{
    [Export(typeof(IDemo))]
    class WolfGoatCabbageDemo : IDemo
    {
        public string Name { get; private set; }

        public WolfGoatCabbageDemo()
        {
            Name = "Wolf Goat Cabbage";
        }

        public override string ToString()
        {
            return Name;
        }

        public void Execute()
        {
            var model = new Algoritmia.Problems.Puzzles.WolfGoatCabbageSolver();
            var vm = new ViewModel(model);
            var view = new View { DataContext = vm };
            view.Show();
        }
    }
}